home *** CD-ROM | disk | FTP | other *** search
-
- mainloop()
- {
-
- while (!terminated)
- {
-
- Wait( 1<<EasyElementsWnd->UserPort->mp_SigBit);
-
- while ((!terminated) && (imsg = GT_GetIMsg(EasyElementsWnd->UserPort)))
- {
-
- gad = (struct Gadget *)imsg->IAddress;
- imsgClass = imsg->Class;
- imsgCode = imsg->Code;
-
- GT_ReplyIMsg(imsg);
-
-
- switch (imsgClass)
- {
- case IDCMP_CLOSEWINDOW:
- terminated = TRUE;
- break;
- case IDCMP_REFRESHWINDOW:
- GT_BeginRefresh(EasyElementsWnd);
- GT_EndRefresh(EasyElementsWnd,TRUE);
- break;
- case IDCMP_GADGETUP:
- switch (gad->GadgetID)
- {
-
- case GD_Input:
- input = (((struct StringInfo *)gad->SpecialInfo)->Buffer);
- pressed_Input();
- break;
- }
- default:
- break;
-
- }
- }
- }
- }
-
-